PBGetVol
You can use thePBGetVol
function to determine the default volume and default directory.
FUNCTION PBGetVol (paramBlock: ParmBlkPtr; async: Boolean): OSErr;
paramBlock
- A pointer to a basic File Manager parameter block.
async
- A Boolean value that specifies asynchronous (
TRUE
) or synchronous (FALSE
) execution.
--> ioCompletion
ProcPtr
A pointer to a completion routine. <-- ioResult
OSErr
The result code of the function. <-- ioNamePtr
StringPtr
A pointer to a pathname. <-- ioVRefNum
Integer
A volume reference number
or a working directory
reference number.DESCRIPTION
ThePBGetVol
function returns, inioNamePtr
, a pointer to the name of the default volume (unlessioNamePtr
isNIL
) and, inioVRefNum
, its volume reference number. If a default directory was set with a previous call toPBSetVol
, a pointer to its name is returned inioNamePtr
and its working directory reference number is returned inioVRefNum
. However, if, in a previous call toHSetVol
(orPBHSetVol
), a working directory reference number was passed in,PBGetVol
returns a volume reference number in theioVRefNum
field.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBGetVol
is_GetVol
.RESULT CODES
noErr 0 No error nsvErr -35 No default volume